package com.wwwarehouse.usercenter.bean.authoritydistribute;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author : mundane
 * @time : 2017/9/20 17:25
 * @description :
 * @file : AuthorityWrapItemBean.java
 */

public class AuthorityWrapItemBean implements Parcelable {
	public boolean isSelected;

	public AuthorityDistributeItemBean mItemBean;

	public AuthorityWrapItemBean(AuthorityDistributeItemBean itemBean) {
		mItemBean = itemBean;
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeByte(this.isSelected ? (byte) 1 : (byte) 0);
		dest.writeParcelable(this.mItemBean, flags);
	}

	protected AuthorityWrapItemBean(Parcel in) {
		this.isSelected = in.readByte() != 0;
		this.mItemBean = in.readParcelable(AuthorityDistributeItemBean.class.getClassLoader());
	}

	public static final Parcelable.Creator<AuthorityWrapItemBean> CREATOR = new Parcelable.Creator<AuthorityWrapItemBean>() {
		@Override
		public AuthorityWrapItemBean createFromParcel(Parcel source) {
			return new AuthorityWrapItemBean(source);
		}

		@Override
		public AuthorityWrapItemBean[] newArray(int size) {
			return new AuthorityWrapItemBean[size];
		}
	};
}
